package com.lry.common;

import com.lry.compressor.CompressorType;
import com.lry.serialize.SerializerType;

public class ProtocolConstants {
    /**
     * Magic code
     */
    public static final byte[] MAGIC_CODE_BYTES = {(byte) 0xda, (byte) 0xda};

    /**
     * Protocol version
     */
    public static final byte VERSION = 1;

    /**
     * Max frame length
     */
    public static final int MAX_FRAME_LENGTH = 8 * 1024 * 1024;


    public static final byte CONFIGURED_SERIALIZER = SerializerType.KRYO.getCode();

    public static final byte CONFIGURED_COMPRESSOR = CompressorType.ZIP.getCode();

    public static final short V1_HEAD_LENGTH = 16;
}
